<template>
  <view class="check-progress-container">
    <!-- 导航栏 -->
    <uni-nav-bar
      title="查询开店进度"
      left-icon="back"
      @click-left="goBack"
      fixed
    />

    <!-- 主要内容 -->
    <view class="content">
      <!-- Logo 和标题 -->
      <view class="header">
        <view class="logo-container">
          <view class="logo-bg">
            <uni-icons type="calendar" size="48" color="#fff" />
          </view>
        </view>
        <text class="title">查询开店进度</text>
      </view>

      <!-- 表单区域 -->
      <view class="form-container">
        <!-- 登录账号输入框 -->
        <view class="input-wrapper">
          <view class="input-icon">
            <uni-icons type="person" size="20" color="#ffa726" />
          </view>
          <input
            class="input"
            v-model="formData.account"
            placeholder="请输入您的登录账号"
            placeholder-class="placeholder"
          />
        </view>

        <!-- 登录密码输入框 -->
        <view class="input-wrapper">
          <view class="input-icon">
            <uni-icons type="locked" size="20" color="#ffa726" />
          </view>
          <input
            class="input"
            v-model="formData.password"
            type="password"
            placeholder="请输入您登录密码"
            placeholder-class="placeholder"
          />
        </view>

        <!-- 查询按钮 -->
        <view class="btn-container">
          <uni-button class="query-btn" type="primary" @click="handleQuery">
            查询
          </uni-button>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref } from "vue";

// 表单数据
const formData = ref({
  account: "",
  password: "",
});

// 返回上一页
const goBack = () => {
  uni.navigateBack();
};

// 查询进度
const handleQuery = () => {
  if (!formData.value.account.trim()) {
    uni.showToast({
      title: "请输入登录账号",
      icon: "none",
    });
    return;
  }

  if (!formData.value.password.trim()) {
    uni.showToast({
      title: "请输入登录密码",
      icon: "none",
    });
    return;
  }

  uni.showToast({
    title: "查询功能开发中",
    icon: "none",
  });
};
</script>

<style scoped lang="scss">
.check-progress-container {
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  padding: 80rpx 40rpx;
}

// 头部
.header {
  text-align: center;
  margin-bottom: 100rpx;

  .logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40rpx;

    .logo-bg {
      width: 160rpx;
      height: 160rpx;
      background: linear-gradient(135deg, #ffd54f 0%, #ffa726 100%);
      border-radius: 40rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8rpx 24rpx rgba(255, 167, 38, 0.3);
    }
  }

  .title {
    display: block;
    font-size: 40rpx;
    font-weight: 600;
    color: #ffa726;
  }
}

// 表单容器
.form-container {
  display: flex;
  flex-direction: column;
  gap: 30rpx;
}

// 输入框包装
.input-wrapper {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 2rpx solid #ffa726;
  border-radius: 50rpx;
  padding: 0 40rpx;
  height: 96rpx;

  .input-icon {
    display: flex;
    align-items: center;
    margin-right: 20rpx;
  }

  .input {
    flex: 1;
    font-size: 28rpx;
    color: #333;
  }

  .placeholder {
    color: #999;
  }
}

// 按钮容器
.btn-container {
  margin-top: 40rpx;

  .query-btn {
    width: 100%;
    height: 88rpx;
    background-color: #ffa726;
    border-radius: 44rpx;
    font-size: 32rpx;
    font-weight: 600;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;

    &::after {
      border: none;
    }
  }
}
</style>
